-
Notifications
You must be signed in to change notification settings - Fork 904
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add compute_mapping_indices used by shared memory groupby #17147
Add compute_mapping_indices used by shared memory groupby #17147
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One question.
So this step doesn't have any usage for the new code as well as tests, right? If there is no unit tests, it would be difficult to verify if the implementation is valid. But I'm fine to have it verified in the next step follow-up PR. |
Correct, this and #17162 are the two major kernels for shared memory groupby. Creating unit tests for those kernels isn’t straightforward. Both PRs are synced with #16619, so if #16619 passes all tests, the algorithm should be correct. |
/merge |
This work is part of splitting the original bulk shared memory groupby PR #16619. This PR introduces the `compute_shared_memory_aggs` API, which is utilized by the shared memory groupby. The shared memory groupby process consists of two main steps. The first step was introduced in #17147, and this PR implements the second step, where the actual aggregations are performed based on the offsets from the first step. Each thread block is designed to handle up to 128 unique keys. If this limit is exceeded, there won't be enough space to store temporary aggregation results in shared memory, so a flag is set to indicate that follow-up global memory aggregations are needed to complete the remaining aggregation requests. Authors: - Yunsong Wang (https://github.com/PointKernel) Approvers: - David Wendt (https://github.com/davidwendt) - Nghia Truong (https://github.com/ttnghia) - Bradley Dice (https://github.com/bdice) URL: #17162
Description
This work is part of splitting the original bulk shared memory groupby PR #16619.
This PR introduces the
compute_mapping_indices
API, which is used by the shared memory groupby. libcudf will opt for the shared memory code path when the aggregation request is compatible with shared memory, i.e. there is enough shared memory space and no dictionary aggregation requests. Aggregating with shared memory involves two steps. The first step, introduced in this PR, calculates the offset for each input key within the shared memory aggregation storage, as well as the offset when merging the shared memory results into global memory.Checklist